<layout name='Layout/layout_main' />
<script type="text/javascript">
	function add() {
		window.open("{:U('add')}", "_self");
	}

	function del(id){
		yes=confirm('确定要删除吗？')
		if (yes)
		{
			window.open(fix_url("{:U('del')}?id=" + id), "_self");
		}
	}

	$(document).ready(function() {
		set_return_url();
	})
</script>
	<form method='post' id="form_data">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<!--  邮件分类 -->
		<div class="title panel panel-default"><div class="panel-body"><h3 class="col-md-12">邮件分类</h3></div>
		</div>
		<div class="operate panel panel-default">	<div class="panel-body">
			<div class="pull-right">
				<a  onclick="add()" class="btn btn-default">新建</a>
			</div>
		</div></div>
		<div class="ul-table">
			<ul>
				<li class="thead">
					<span class="col-md-6">
						规则
					</span>
					<span class="col-md-3">
						状态
					</span>
					<span class="col-md-3">
						操作
					</span>															
				</li>
				<if condition="count($list) eq 0 ">
					<li class="tbody text-center">
						<h3>没找到相应的数据</h3></div>
					</li>
				</ul>
			</div>
			<else/>
				<volist name="list" id="vo">
					<li class="tbody">
						<span class="col-md-6">
							如果：
						{$vo|mail_org_string}
						</span>
						<span class="col-md-3 text-center">
							{$vo.is_del|status}
						</span>
						<span class="col-md-3 text-center">
							<a class="btn btn-link" href="{:U('edit?id='.$vo['id'])}">修改</a>
							&nbsp;&nbsp;
							<a class="btn btn-link" onclick="del({$vo.id});return false;">删除</a>
						</span>
					</li>
					</volist>
			</if>
	</form>
</div>